package contacts.po;

import java.io.Serializable;
import java.util.Date;


@SuppressWarnings("serial")
public class Student implements Comparable<Object>,Serializable{
	private int studentId;
    private String studentNo;
    private String studentName;
    private Date birthday;
    private String telephone;
    private String email;
    private String birthPlace;
    private String address;
    private Room room;
	public Student() {
		super();
	}
	public Student(int studentId,String studentNo, String studentName,Date date, String telephone, String email,
			String birthPlace, String address,Room room) {
		super();
		this.studentId = studentId;
		this.studentNo = studentNo;
		this.studentName = studentName;
		this.birthday = date;
		this.telephone = telephone;
		this.email = email;
		this.birthPlace = birthPlace;
		this.address = address;
		this.room = room;
	}

	public Student(int studentId, String studentNo, String studentName, String telephone, String email,
			String birthPlace, String address, Room room) {
		super();
		this.studentId = studentId;
		this.studentNo = studentNo;
		this.studentName = studentName;
		this.telephone = telephone;
		this.email = email;
		this.birthPlace = birthPlace;
		this.address = address;
		this.room = room;
	}
	public int getStudentId() {
		return studentId;
	}
	public void setStudentId(int studentId) {
		this.studentId = studentId;
	}
	public String getStudentNo() {
		return studentNo;
	}
	public void setStudentNo(String studentNo) {
		this.studentNo = studentNo;
	}
	public String getStudentName() {
		return studentName;
	}
	public void setStudentName(String studentName) {
		this.studentName = studentName;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public String getTelephone() {
		return telephone;
	}
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getBirthPlace() {
		return birthPlace;
	}
	public void setBirthPlace(String birthPlace) {
		this.birthPlace = birthPlace;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public Room getRoom() {
		return room;
	}
	public void setRoom(Room room) {
		this.room = room;
	}
	@Override
	public String toString() {
		return "Student [编号:"+studentId+"，学号:" + studentNo + ", 姓名:" + studentName + ", 生日:"
				+ birthday + ", 电话号码:" + telephone + ", 电子邮箱:" + email + ", 籍贯:" + birthPlace
				+ ", 家庭地址:" + address + ", 宿舍 " + room ;
	}
	public int compareTo(Object object) {
		Student bk = (Student) object;
		int difference = (int) ((this.getStudentId() - bk.getStudentId()) * 10000);
		return difference;
	}
	
	
}
